#include <stdio.h>

int main()
{
    int n;
    scanf("%d",&n);
    int x=0;
    x += n%10*100;
    n/=10;
    x += n%10*10;
    n/=10;
    x+= n;
    printf("%d\n",x);
    return 0;
}